;Assembler header file for OSReadSysInfo
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:03:53 2005
;Jonathan Coxhead, jonathan@doves.demon.co.uk, 18 May 1995

        [       :LNOT: :DEF: OSReadSysInfo_Hdr
        GBLS    OSReadSysInfo_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

;Symbols for constants
OSReadSysInfo_SpecialFunction   *       &FF
OSReadSysInfo_SpecialFunctionShift *       0
OSReadSysInfo_SpecialFunctionNone *       &0
OSReadSysInfo_SpecialFunctionIOEB *       &1
OSReadSysInfo_IOControl         *       &FF00
OSReadSysInfo_IOControlShift    *       8
OSReadSysInfo_IOControlIOC      *       &0
OSReadSysInfo_IOControlIOMD     *       &1
OSReadSysInfo_MemoryControl     *       &FF0000
OSReadSysInfo_MemoryControlShift *       16
OSReadSysInfo_MemoryControlMEMC1 *       &0
OSReadSysInfo_MemoryControlIOMD *       &1
OSReadSysInfo_VideoControl      *       &FF000000
OSReadSysInfo_VideoControlShift *       24
OSReadSysInfo_VideoControlVIDC1a *       &0
OSReadSysInfo_VideoControlVIDC20 *       &1
OSReadSysInfo_IO                *       &FF
OSReadSysInfo_IOShift           *       0
OSReadSysInfo_IONone            *       &0
OSReadSysInfo_IO82C710          *       &1
OSReadSysInfo_LCDControl        *       &FF
OSReadSysInfo_LCDControlShift   *       0
OSReadSysInfo_LCDControlNone    *       &0
OSReadSysInfo_LCDControlType1   *       &1
OSReadSysInfo_PlatformUnknown   *       &0
OSReadSysInfo_PlatformRiscPC    *       &1
OSReadSysInfo_PlatformA7000     *       &2
OSReadSysInfo_PlatformA7000Plus *       &3
OSReadSysInfo_PlatformHAL       *       &5
OSReadSysInfo_PlatformSupportsPodules *       &1
OSReadSysInfo_PlatformSupportsPCI *       &2
OSReadSysInfo_PlatformSupportsMultiCPU *       &4
OSReadSysInfo_PlatformHasSoftPowerControl *       &8
OSReadSysInfo_PlatformRunsOSFromRAM *       &10
OSReadSysInfo_OSName            *       &0
OSReadSysInfo_PartNumber        *       &1
OSReadSysInfo_BuildTime         *       &2
OSReadSysInfo_DealerName        *       &3
OSReadSysInfo_UserName          *       &4
OSReadSysInfo_UserAddress       *       &5

;Symbols for structure offsets and sizes
                                ^       0
                                #       Bits
OSReadSysInfo_Flags0            *       @

                                ^       0
                                #       Bits
OSReadSysInfo_Flags1            *       @

                                ^       0
                                #       Bits
OSReadSysInfo_Flags2            *       @

                                ^       0
                                #       Int
OSReadSysInfo_Platform          *       @

                                ^       0
                                #       Bits
OSReadSysInfo_PlatformFlags     *       @

                                ^       0
                                #       Int
OSReadSysInfo_ROMInformationCode *       @


;Symbols for SWI's and SWI reason codes
XOS_ReadSysInfo                 *       &20058
OS_ReadSysInfo                  *       &58

OSReadSysInfo_ScreenSize        *       &0
   ;Entry
   ;  R0 = &0
   ;Exit
   ;  R0 = screen_size (Int)

OSReadSysInfo_Mode              *       &1
   ;Entry
   ;  R0 = &1
   ;Exit
   ;  R0 = mode (OS_Mode)
   ;  R1 = monitor_type (Int)
   ;  R2 = sync (Int)

OSReadSysInfo_MachineId         *       &2
   ;Entry
   ;  R0 = &2
   ;Exit
   ;  R0 = config0 (OSReadSysInfo_Flags0)
   ;  R1 = config1 (OSReadSysInfo_Flags1)
   ;  R2 = config2 (OSReadSysInfo_Flags2)
   ;  R3 = id_lo (Bits)
   ;  R4 = id_hi (Bits)

OSReadSysInfo_71XFeatures       *       &3
   ;Entry
   ;  R0 = &3
   ;Exit
   ;  R0 = features (Bits)
   ;  R1 = features_extended0 (Bits)
   ;  R2 = features_extended1 (Bits)
   ;  R3 = features_extended2 (Bits)
   ;  R4 = features_extended3 (Bits)

OSReadSysInfo_EthernetAddress   *       &4
   ;Entry
   ;  R0 = &4
   ;Exit
   ;  R0 = address_lo (Bits)
   ;  R1 = address_hi (Bits)

OSReadSysInfo_RawMachineId      *       &5
   ;Entry
   ;  R0 = &5
   ;Exit
   ;  R0 = id_lo (Bits)
   ;  R1 = id_hi (Bits)

OSReadSysInfo_KernelValue       *       &6
   ;Entry
   ;  R0 = &6
   ;  R1 = &0
   ;  R2 = item (Int)
   ;Exit
   ;  R2 = value (Int)

OSReadSysInfo_KernelValues      *       &6
   ;Entry
   ;  R0 = &6
   ;  R1 -> item_list (Int)
   ;  R2 = value_buffer (pointer to Int)

OSReadSysInfo_KernelValue_SVCSTK *       &10
   ;Entry
   ;  R0 = &6
   ;  R1 = &0
   ;  R2 = &10
   ;Exit
   ;  R2 = stack_top (pointer to data)

OSReadSysInfo_KernelValue_SWIDispatchTable *       &12
   ;Entry
   ;  R0 = &6
   ;  R1 = &0
   ;  R2 = &12
   ;Exit
   ;  R2 = dispatch_table (pointer to data)

OSReadSysInfo_LastAbortInfo     *       &7
   ;Entry
   ;  R0 = &7
   ;Exit
   ;  R1 = abort_pc (pointer to data)
   ;  R2 = abort_psr (pointer to data)
   ;  R3 = fault_address (pointer to data)

OSReadSysInfo_PlatformClass     *       &8
   ;Entry
   ;  R0 = &8
   ;Exit
   ;  R0 = platform_class (OSReadSysInfo_Platform)
   ;  R1 = flags (OSReadSysInfo_PlatformFlags)
   ;  R2 = valid_flags (OSReadSysInfo_PlatformFlags)

OSReadSysInfo_ROMInformation    *       &9
   ;Entry
   ;  R0 = &9
   ;  R1 = code (OSReadSysInfo_ROMInformationCode)
   ;Exit
   ;  R0 -> information (String)

        ]
        END
